﻿@model Villa

<div class="w-100 card border-0 p-4">
    <div class="card-header bg-success bg-gradient m-lg-0 py-3">
        <div class="row">
            <div class="col-12 text-center">
                <h2 class="text-white py-2">Update Villa</h2>
            </div>
        </div>
    </div>
    <div class="card-body border p-4">
        <form method="post" class="row" enctype="multipart/form-data">
            <input asp-for="Id" hidden />
            <div class="col-10">
                <div class="p-3">
                    @* <div asp-validation-summary="ModelOnly"></div> *@
                    <div class="form-floating py-2 col-12">
                        <input asp-for="Name" class="form-control border shadow" />
                        <label asp-for="Name" class="ms-2"></label>
                        <span asp-validation-for="Name" class="text-danger"></span>
                    </div>

                    <div class="form-floating py-2 col-12">
                        <input asp-for="Description" class="form-control border shadow" />
                        <label asp-for="Description" class="ms-2"></label>
                        <span asp-validation-for="Description" class="text-danger"></span>
                    </div>
                    <div class="form-floating py-2 col-12">
                        <input asp-for="Price" class="form-control border shadow" />
                        <label asp-for="Price" class="ms-2"></label>
                        <span asp-validation-for="Price" class="text-danger"></span>
                    </div>
                    <div class="form-floating py-2 col-12">
                        <input asp-for="Sqft" class="form-control border shadow" />
                        <label asp-for="Sqft" class="ms-2"></label>
                        <span asp-validation-for="Sqft" class="text-danger"></span>
                    </div>
                    <div class="form-floating py-2 col-12">
                        <input asp-for="Occupancy" class="form-control border shadow" />
                        <label asp-for="Occupancy" class="ms-2"></label>
                        <span asp-validation-for="Occupancy" class="text-danger"></span>
                    </div>
                    <div class="form-floating py-2 col-12">
                        <input asp-for="Image" class="form-control border shadow" />
                        <input asp-for="ImageUrl" hidden class="form-control border shadow  " />
                        <label asp-for="ImageUrl" class="ms-2"></label>
                        <span asp-validation-for="ImageUrl" class="text-danger"></span>
                    </div>

                    <div class="row pt-2">
                        <div class="col-6 col-md-3">
                            <button type="submit" class="btn btn-success w-100">
                                <i class="bi bi-check-circle"></i> Update
                            </button>
                        </div>
                        <div class="col-6 col-md-3">
                            <a asp-controller="Villa" asp-action="Index" class="btn btn-secondary w-100">
                                <i class="bi bi-x-circle"></i> Cancel
                            </a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-2">
                <img src="@Model.ImageUrl" width="100%" style="border-radius:5px; border:1px solid #bbb9b9" />
            </div>

        </form>
    </div>
</div>


@section Scripts {
    @{
        <partial name="_ValidationScriptsPartial" />
    }
}